package com.isoft.controller.echar;

import com.isoft.controller.BaseController;
import com.isoft.entity.echar.Echar;
import com.isoft.service.echar.EcharService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/api")
public class EcharController extends BaseController {
    @Autowired
    EcharService EcharService;

    @GetMapping("/echar")
    public List<Echar> getEchar() {
        List<Echar> echar = EcharService.getEchar();
        return echar;
    }

}
